#include "downloadlayout.h"

#include <QWidget>

DownloadLayout* DownloadLayout::instance = new DownloadLayout;
DownloadLayout::AutoRelease DownloadLayout::_at;

DownloadLayout *DownloadLayout::getInstance()
{
    return instance;
}

void DownloadLayout::setDownloadLayout(QWidget *p)
{
    m_wg = new QWidget(p);
    QLayout* layout = p->layout();
    layout->addWidget(m_wg);
    QVBoxLayout* vlayout = new QVBoxLayout;

    m_wg->setLayout(vlayout);
    vlayout->setContentsMargins(0, 0, 0, 0);
    m_layout = vlayout;

    vlayout->addStretch();
}

QLayout *DownloadLayout::getDownloadLayout()
{
    return m_layout;
}
